<template>
    <div class="header clearfix">
        <a href="" class="logo fl"><img src="../images/logo.jpg" /></a>
        <div class="headerRight fr">
            <p>
                <a href=""><i class="icon ic1"></i>服务热线：4008805588</a>
            </p>
            <ul class="navlist list clearfix" id="J_navlist">
                <li>
                    <a href="" class="current">网站首页</a>
                </li>
                <li @click="goList()">
                    <a href="javascript:void(0);" data_ld="#about" @mouseenter="showDrop" @mouseleave="hideDrop">关于大金</a>
                </li>
                <li>
                    <a href="javascript:void(0);" data_ld="#company">主营业务</a>
                </li>
                <li>
                    <a href="javascript:void(0);" data_ld="#people">工程案例</a>
                </li>
                <li>
                    <a href="javascript:void(0);" data_ld="#activity">资讯中心</a>
                </li>
                <li>
                    <a href="javascript:void(0);" data_ld="#contact">联系我们</a>
                </li>
            </ul>

            <div id="about" v-show="show" class="subDrop clearfix">
                <img src="images/关于.jpg" class="fl" />
                <div class="sublink fl">
                    <a href="">利群讲座</a>
                    <a href="">智富讲座</a>
                </div>
            </div>
<!--            <div id="company" class="subDrop clearfix">-->
<!--                <img src="images/分公司.jpg" class="fl" />-->
<!--                <div class="sublink fl">-->
<!--                    <a href="">利群讲座2</a>-->
<!--                    <a href="">智富讲座2</a>-->
<!--                </div>-->
<!--            </div>-->

<!--            <div id="people" class="subDrop clearfix">-->
<!--                <img src="images/风云人物.jpg" class="fl" />-->
<!--                <div class="sublink fl">-->
<!--                    <a href="">利群讲座3</a>-->
<!--                    <a href="">智富讲座3</a>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div id="activity" class="subDrop clearfix">-->
<!--                <img src="images/资讯.jpg" class="fl" />-->
<!--                <div class="sublink fl">-->
<!--                    <a href="">利群讲座4</a>-->
<!--                    <a href="">智富讲座4</a>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div id="contact" class="subDrop clearfix">-->
<!--                <img src="images/联系.jpg" class="fl" />-->
<!--                <div class="sublink fl">-->
<!--                    <a href="">利群讲座5</a>-->
<!--                    <a href="">智富讲座5</a>-->
<!--                </div>-->
<!--            </div>-->
        </div>
    </div>

</template>

<script>
    import { getAllMenu } from "@/api/home.js";
    export default {
        name: "Header",
        data() {
            return{
                show: false,
                menuList: []
            }
        },
        mounted() {
          this.getMenuList();
        },
        methods: {
            getMenuList() {
                getAllMenu().then(res=>{
                    this.menuList = res.rows;
                });
            },
            goList() {
                this.$router.push('/list');
            },
            showDrop() {
                this.show = true;
            },
            hideDrop() {
                this.show = false;
            }
        }
    }
</script>

<style scoped>

</style>